package core.schedule.snake.schedule.core;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

public class JDKTimmer implements SchedulerInterface {
	
	private static final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(5);

	public void execute(final TaskInfo taskInfo) {
		scheduler.scheduleAtFixedRate(new Runnable() {
			public void run() {
				DsfaTaskHelper.timmerBussiness(taskInfo);
			}		
		},taskInfo.getInitTime(),taskInfo.getJiangeTime(),taskInfo.getTimeUnit());		

	}

}
